home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIIDNService.idl < prev    next >
Text File  |  2006-05-08  |  3KB  |  92 lines

  1. /* ***** BEGIN LICENSE BLOCK *****
  2.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3.  *
  4.  * The contents of this file are subject to the Mozilla Public License Version
  5.  * 1.1 (the "License"); you may not use this file except in compliance with
  6.  * the License. You may obtain a copy of the License at
  7.  * http://www.mozilla.org/MPL/
  8.  *
  9.  * Software distributed under the License is distributed on an "AS IS" basis,
  10.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11.  * for the specific language governing rights and limitations under the
  12.  * License.
  13.  *
  14.  * The Original Code is i-DNS.net International, Inc. code.
  15.  *
  16.  * The Initial Developer of the Original Code is
  17.  * i-DNS.net International.
  18.  * Portions created by the Initial Developer are Copyright (C) 2001
  19.  * the Initial Developer. All Rights Reserved.
  20.  *
  21.  * Contributor(s): bobj@netscape.com,
  22.  *                 brendan@mozilla.org,
  23.  *                 darin@netscape.com,
  24.  *                 ftang@netscape.com,
  25.  *                 gagan@netscape.com,
  26.  *                 nhotta@netscape.com,
  27.  *                 william.tan@i-dns.net
  28.  *
  29.  *
  30.  * Alternatively, the contents of this file may be used under the terms of
  31.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  32.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  33.  * in which case the provisions of the GPL or the LGPL are applicable instead
  34.  * of those above. If you wish to allow use of your version of this file only
  35.  * under the terms of either the GPL or the LGPL, and not to allow others to
  36.  * use your version of this file under the terms of the MPL, indicate your
  37.  * decision by deleting the provisions above and replace them with the notice
  38.  * and other provisions required by the GPL or the LGPL. If you do not delete
  39.  * the provisions above, a recipient may use your version of this file under
  40.  * the terms of any one of the MPL, the GPL or the LGPL.
  41.  *
  42.  * ***** END LICENSE BLOCK ***** */
  43.  
  44. #include "nsISupports.idl"
  45.  
  46. /**
  47.  * nsIIDNService interface.
  48.  *
  49.  * IDN (Internationalized Domain Name) support. Provides facilities
  50.  * for manipulating IDN hostnames according to the specification set
  51.  * forth by the IETF.
  52.  *
  53.  * IDN effort:
  54.  * http://www.ietf.org/html.characters/idn-charter.html
  55.  * http://www.i-dns.net
  56.  *
  57.  * IDNA specification:
  58.  * http://search.ietf.org/internet-drafts/draft-ietf-idn-idna-06.txt
  59.  */
  60.  
  61. [scriptable, uuid(7B67747E-A8C4-4832-80C7-39EBB0C11F94)]
  62. interface nsIIDNService : nsISupports
  63. {
  64.     /**
  65.      * Prepares the input hostname according to IDNA ToASCII operation,
  66.      * the input hostname is assumed to be UTF8-encoded.
  67.      *
  68.      * The current input is string, but this may change pending Bug 84186.
  69.      */
  70.     ACString convertUTF8toACE(in AUTF8String input);
  71.  
  72.  
  73.     /**
  74.      * This is the ToUnicode operation as specified in the IDNA proposal,
  75.      * with an additional step to encode the result in UTF-8.
  76.      * It takes an ACE-encoded hostname and performs ToUnicode to it, then
  77.      * encodes the resulting string into UTF8.
  78.      */
  79.     AUTF8String convertACEtoUTF8(in ACString input);
  80.  
  81.     /**
  82.      * Checks if the input string is ACE encoded or not.
  83.      */
  84.     boolean isACE(in ACString input);
  85.  
  86.     /**
  87.      * Performs the unicode normalization needed for hostnames in IDN,
  88.      * for callers that want early normalization.
  89.      */
  90.     AUTF8String normalize(in AUTF8String input);
  91. };
  92.